import { requestHasToken as request } from '../util/server'

// 添加学校
export function addSchool (school) {
  return request({
    url: '/tbSchool/addTbSchool',
    method: 'post',
    data: school
  })
};
// 修改学校
export function updateSchool (school) {
  return request({
    url: '/tbSchool/updateTbSchool',
    method: 'put',
    data: school
  })
};
// 删除学校
export function deleteSchool (schoolId) {
  return request({
    url: '/tbSchool/deleteTbSchool/' + schoolId,
    method: 'delete'
  })
};
// 分页查询学校
export function getSchoolListByPage (query) {
  return request({
    url: '/tbSchool/pageTbSchoolPage',
    method: 'post',
    data: query
  })
};
// 查询所有学校
export function getAllSchoolList () {
  return request({
    url: '/tbSchool/queryTbSchooleList',
    method: 'get'
  })
};
// 添加学校区域
export function addSchoolArea (area) {
  return request({
    url: '/tbSchoolArea/addTbSchoolArea',
    method: 'post',
    data: area
  })
};
// 修改学校区域
export function updateSchoolArea (area) {
  return request({
    url: '/tbSchoolArea/updateTbSchoolArea',
    method: 'put',
    data: area
  })
};
// 删除学校区域
export function deleteSchoolArea (areaId) {
  return request({
    url: '/tbSchoolArea/deleteTbSchoolArea/' + areaId,
    method: 'delete'
  })
};
// 分页查询学校区域
export function getSchoolArea (query) {
  return request({
    url: '/tbSchoolArea/queryTbSchoolAreaPage',
    method: 'post',
    data: query
  })
};
// 添加用户
export function addUser (user) {
  return request({
    url: '/TbUserRegistration/addTbUserRegistration',
    method: 'post',
    data: user
  })
};
// 修改用户
export function updateUser (user) {
  return request({
    url: '/TbUserRegistration/updateTbUserRegistration',
    method: 'put',
    data: user
  })
};
// 删除注册用户
export function deleteUser (userId) {
  return request({
    url: '/TbUserRegistration/deleteTbUserRegistration/' + userId,
    method: 'delete'
  })
};
// 分页查询用户
export function getUserListByPage (query) {
  return request({
    url: '/TbUserRegistration/queryTbUserRegistrationPage',
    method: 'post',
    data: query
  })
}



